﻿using GPSTrackingDBV2.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace WCFPointOfSaleService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IPointOfSaleService" in both code and config file together.
    [ServiceContract]
    public interface IPointOfSaleService
    {
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetVersion")]
        string GetVersion();

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetSQL")]
        string GetSQL();

        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetAllStock?CompanyId={companyId}")]
        List<Entities.Stock> GetAllStock(string companyId);
        
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "Authentication?guid={guid}&imei={imei}")]
        Entities.Authentication Authentication(string guid, string imei);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/GetAppPurchase?guid={guid}")]
        Entities.Aplication GetAppPurchase(string guid);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/IdentifiedUser?companyID={companyID}&username={username}&password={password}")]
        Entities.Users IdentifiedUser(int companyID, string username, string password);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/GetApplicationMenu?companyID={companyID}&username={username}")]
        List<Entities.Menu> GetApplicationMenu(int companyID, string username);


        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/IdentifiedAdmin?companyID={companyID}&adminUsername={adminUsername}&password={password}")]
        Entities.Admin IdentifiedAdmin(int companyID, string adminUsername, string password);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStock?action={action}&stockId={stockId}&companyId={companyId}&transactionDate={transactionDate}&tick={tick}&uuidTransaction={uuidTransaction}&adminUsername={adminUsername}&totalToGet={totalToGet}")]
        List<Entities.Stock> SyncStock(string action, int stockId, int companyId, DateTime transactionDate, string tick, string uuidTransaction, string adminUsername, int totalToGet);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStockByAditionalImages?action={action}&stockId={stockId}&companyId={companyId}&numImage={numImage}&transactionDate={transactionDate}&tick={tick}&uuidTransaction={uuidTransaction}&totalToGet={totalToGet}")]
        List<Entities.StockByAditionalImages> SyncStockByAditionalImages(string action, int stockId, int companyId, int numImage, DateTime transactionDate, string tick, string uuidTransaction, int totalToGet);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStockCategories?action={action}&companyId={companyId}&stockCategoryId={stockCategoryId}&uuid={uuid}&tick={tick}&transactionDate={transactionDate}")]
        List<Entities.StockCategories> SyncStockCategories(string action, int companyId, int stockCategoryId, string uuid, string tick, DateTime transactionDate);

        
        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncClient?action={action}&syncTransaction={syncTransaction}&tick={tick}&clientId={clientId}&name={name}&phone1={phone1}&phone2={phone2}&latitude={latitude}&longitude={longitude}&transactionDate={transactionDate}&typeUserTransaction={typeUserTransaction}&usernameTransaction={usernameTransaction}&uuidTransaction={uuidTransaction}&companyIdTransaction={companyIdTransaction}&clientGroupId={clientGroupId}")]
        List<Entities.Clients> SyncClient(string action, string syncTransaction, string tick, int clientId, string name, string phone1, string phone2, float latitude, float longitude, DateTime transactionDate, string typeUserTransaction, string usernameTransaction, string uuidTransaction, int companyIdTransaction, int clientGroupId);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncClientsByEmail?action={action}&syncTransaction={syncTransaction}&tick={tick}&clientId={clientId}&emailId={emailId}&name={name}&email={email}&transactionDate={transactionDate}&typeUserTransaction={typeUserTransaction}&usernameTransaction={usernameTransaction}&uuidTransaction={uuidTransaction}&companyIdTransaction={companyIdTransaction}")]
        List<Entities.ClientsByEmail> SyncClientsByEmail(string action, string syncTransaction, string tick, int clientId, int emailId, string name, string email, DateTime transactionDate, string typeUserTransaction, string usernameTransaction, string uuidTransaction, int companyIdTransaction);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncEmailToSendStock?action={action}&emailToSendStockId={emailToSendStockId}&stockId={stockId}&stockFileId={stockFileId}&clientId={clientId}&creationDate={creationDate}&typeUserTransaction={typeUserTransaction}&usernameTransaction={usernameTransaction}&uuidTransaction={uuidTransaction}&companyId={companyId}&reservedQuantity={reservedQuantity}&isSendInvoice={isSendInvoice}")]
        Entities.EmailToSendStock SyncEmailToSendStock(string action, int emailToSendStockId, int stockId, int stockFileId, int clientId, DateTime creationDate, string typeUserTransaction, string usernameTransaction, string uuidTransaction, int companyId, int reservedQuantity, bool isSendInvoice);

         

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncUser?action={action}&username={username}&tick={tick}&transactionDate={transactionDate}&uuid={uuid}&companyId={companyId}")]
        List<Entities.Users> SyncUser(string action, string username, string tick, DateTime transactionDate, string uuid, int companyId);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/UnlinkApp?uuid={uuid}&companyId={companyId}&applicationId={applicationId}")]
        void UnlinkApp(string uuid, int companyId, int applicationId);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStockFilesTypeOfFile?action={action}&stockFileTypeOfFileId={stockFileTypeOfFileId}&companyId={companyId}&transactionDate={transactionDate}&tick={tick}&uuidTransaction={uuidTransaction}")]
        List<Entities.StockFilesTypeOfFile> SyncStockFilesTypeOfFile(string action, int stockFileTypeOfFileId, int companyId, DateTime transactionDate, string tick, string uuidTransaction);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStockFilesByUsername?action={action}&stockFileId={stockFileId}&username={username}&companyId={companyId}&transactionDate={transactionDate}&tick={tick}&uuidTransaction={uuidTransaction}")]
        List<Entities.StockFilesByUsername> SyncStockFilesByUsername(string action, int stockFileId, string username, int companyId, DateTime transactionDate, string tick, string uuidTransaction);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncStockFiles?action={action}&stockFileId={stockFileId}&companyId={companyId}&transactionDate={transactionDate}&tick={tick}&uuidTransaction={uuidTransaction}")]
        List<Entities.StockFiles> SyncStockFiles(string action, int stockFileId, int companyId, DateTime transactionDate, string tick, string uuidTransaction);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/StockSettingManager?action={action}&companyId={companyId}&stockSettingId={stockSettingId}&adminUsername={adminUsername}&name={name}&values={values}")]
        List<Entities.StockSettingValues> StockSettingManager(string action, int companyId, int stockSettingId, string adminUsername, string name, string values);
        
        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/StartEmailSendingProcess?companyId={companyId}&username={username}")]
        Entities.ObjectResult<object> StartEmailSendingProcess(int companyId, string username);

        [OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat = WebMessageFormat.Json, Method = "GET", UriTemplate = "/SyncCatalogStatistics?action={action}&companyId={companyId}&uuidTransaction={uuidTransaction}&visorValue={visorValue}&beginDatetime={beginDatetime}&endDatetime={endDatetime}&typeUser={typeUser}&username={username}")]
        void SyncCatalogStatistics(string action, int companyId, string uuidTransaction, string visorValue, DateTime beginDatetime, DateTime endDatetime, string typeUser, string username);

    }
}
